import React from 'react'
import { node, string, number, func } from 'prop-types'

import {
  GridItemWrapper
} from './styledGrid'

export default function GridItem({
  children,
  icon,
  columnNum,
  onClick
}) {
  return (
    <GridItemWrapper
      columnNum={columnNum}
      onClick={onClick}
    >
      <div dangerouslySetInnerHTML={{__html: icon}}></div>
      <div>{children}</div>
    </GridItemWrapper>
  )
}

GridItem.propTypes = {
  children: node,
  icon: string,
  columnNum: number,
  onClick: func
}
